

package com.grj.park.controller;


import com.grj.park.common.R;
import com.grj.park.domain.Hazards;
import com.grj.park.domain.Recharge;
import com.grj.park.service.HazardsService;
import com.grj.park.service.RechargeService;
import lombok.RequiredArgsConstructor;
import org.springframework.web.bind.annotation.GetMapping;
import org.springframework.web.bind.annotation.RequestMapping;
import org.springframework.web.bind.annotation.RestController;

import java.util.List;

@RestController
@RequiredArgsConstructor
@RequestMapping("hazards")
public class HazardsController {

    private final HazardsService hazardsService;

    @GetMapping
    public R<List<Hazards>> getHazardsService(){
        return R.ok(hazardsService.list());
    }

}
